package com.fancy.middleware.common.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = DisruptorProperties.MIDDLEWARE_DISRUPTOR_PREFIX)
public class DisruptorProperties {

    public static final String MIDDLEWARE_DISRUPTOR_PREFIX = "middleware.disruptor";

    // Specify the size of the ring buffer, must be power of 2. RingBuffer 大小，必须是 2 的 N 次方；
    private int bufferSize = 1024;

    public int getBufferSize() {
        return bufferSize;
    }

    public void setBufferSize(int bufferSize) {
        this.bufferSize = bufferSize;
    }
}
